<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
   //ES5 indexOf() 方法返回调用  String 对象中第一次出现的指定值的索引
    var str = "atguigu-damu";
    console.log(str.indexOf("damu",1));

    console.log(str.includes("damu"));
    console.log(str.startsWith("damu"));
    console.log(str.endsWith("damu"));



</script>
</html>